package com.cy.pj.common.pojo;

import lombok.Data;

import java.io.Serializable;



@Data
public class JsonResult implements Serializable {
    private static final long serialVersionUID = -868996739646416767L;
    private Integer state=1;
    private String message="ok";
    private Object data;
    public JsonResult(){

    }

public JsonResult(int result){
        this.data=result;
}
    public JsonResult(String message) {
        this.message = message;
    }

    public JsonResult(Object data) {
        this.data = data;
    }

    public JsonResult(Integer state) {
        this.state = state;
    }

    public JsonResult(Throwable e) {
        this.state=0;
        this.message=e.getMessage();
    }
}
